use RD_COMMON
go

CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K1_K60_K2_K47] ON [dbo].[Sales_Star_Customer] 
(
	[CustomerNumberID] ASC,
	[ShiptoSearchTypeCode] ASC,
	[SourceID] ASC,
	[ShiptoNumber] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]
go

use RD_SalesMart
go

CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K56_K25_K37] ON [dbo].[Sales_Star_Facts] 
(
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC,
	[GLDateID] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K37_K56_K25_K6_K1_K5_K24_K15_K17_K12_45_53_55] ON [dbo].[Sales_Star_Facts] 
(
	[GLDateID] ASC,
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC,
	[ItemNumberID] ASC,
	[FactsExtID] ASC,
	[CustomerNumberID] ASC,
	[ShiptoNumber] ASC,
	[OrderNumber] ASC,
	[LineNumber] ASC,
	[SourceID] ASC
)
INCLUDE ( [QuantityShipped],
[ExtendedPrice],
[ExtendedCost]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K7_K37_K38_K39_K40_K41_K71_K5_K3_K4_K6_1_33] ON [dbo].[Sales_Star_PriceLedger] 
(
	[SequenceNumber] ASC,
	[OrderSuffix] ASC,
	[PriceHistoryAlternateKey] ASC,
	[PriceHistoryAlternateKeySource] ASC,
	[SubSequenceNumber] ASC,
	[Tier] ASC,
	[TargetApplication] ASC,
	[OrderNumberDocumentCompany] ASC,
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[LineNumber] ASC
)
INCLUDE ( [SourceID],
[PriceAdjustmentKeyID]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K56_K25_K5] ON [dbo].[Sales_Star_Facts] 
(
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC,
	[CustomerNumberID] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]
